package com.deer.wms.base.system.web.fpStor;

import com.deer.wms.base.system.model.fpStor.FpMoveMaster;
import com.deer.wms.base.system.service.fpStor.FpMoveService;
import com.deer.wms.base.system.service.fpStor.FpPdaMoveService;
import com.deer.wms.common.core.result.Result;
import com.deer.wms.common.core.result.ResultGenerator;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.text.SimpleDateFormat;

/**手持机移库*/
@Controller
@RequestMapping("/fpStor/fpPdaMove")
@Slf4j
public class FpPdaMoveController  {
    @Autowired
    private FpPdaMoveService fpPdaMoveService;
    @Autowired
    private FpMoveService fpMoveService;


    /*根据托盘条码和库位执行移库操作*/
    @PostMapping("/fpMove")
    @ResponseBody
    public Result findCarrierById(FpMoveMaster fpMoveMaster){
        String carrierId = fpMoveMaster.getCarrierId(); //托号
        String moveAreaCode = fpMoveMaster.getMoveAreaCode();//新库位
        carrierId = "ES5T20122903";
        //查询托盘所属的货区
        String areaCode = fpPdaMoveService.findAreaById(carrierId);
        //判断新库区是否存在


        //更改库位信息



        //同步电子箱单


        return ResultGenerator.genSuccessResult();
    }

}
